<!DOCTYPE HTML>
<html>
<head>
    <include file="Common:header_include"/>
    <title>医患信息列表</title>
    <style>
        #DataTables_Table_0_paginate{
            display: block;
        }
    </style>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 医患信息管理 <span class="c-gray en">&gt;</span> 医患信息列表
    <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div class="pd-20">
    <div class="cl pd-5 bg-1 bk-gray">
        <if condition="!I('get.del')">
            <span class="l">
                <a href="javascript:;" onclick="delectCheck('{:U('del')}',$('.item'))" class="btn btn-danger radius">
                        <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                </a>
                <a href="javascript:;" onclick="showIframe('添加医患','{:U('showAdd')}',600,600)" class="btn btn-primary radius">
                    <i class="Hui-iconfont">&#xe600;</i> 添加医患
                </a>
            </span>
            <span class="l" style="margin-left:30px;">
                <label>选择状态：</label>
                <span class="select-box inline">
                    <select name="status_id" class="select status_id" onchange="reload();" style="width: 80px">
                        <option value="">全部</option>
                        <volist name=":getLinkStatusList()" id="v">
                            <option value="{$v.id}" <if condition="I('get.status_id') eq $v['id']">selected</if> >{$v.title}</option>
                        </volist>
                    </select>
                </span>
            </span>
            <else/>
            <a href="javascript:;" onclick="delectCheck('{:U('deleted')}',$('.item'))" class="btn btn-danger radius">
                <i class="Hui-iconfont">&#xe6e2;</i> 批量彻底删除
            </a>
        </if>
        <!--<span class="r">共有<strong>{:count($list)}</strong>条数据</span>-->
        <span class="r" style="margin-right: 10px">
            <if condition="!I('get.del')">
                <a href="javascript:;" onclick="showdeleted(true)" class="btn btn-danger radius">
                    <i class="Hui-iconfont">&#xe6e2;</i> 回收站
                </a>
                <else/>
                <a href="javascript:;" onclick="showdeleted(false)" class="btn btn-success radius">
                    <i class="Hui-iconfont">&#xe6d4;</i> 返回
                </a>
            </if>
        </span>
    </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-hover table-bg <if condition="$list"> table-sort</if>">
            <thead>
            <tr class="text-c">
                <th width="25"><input type="checkbox"></th>
                <th width="80">ID</th>
                <!--<th width="100">患者ID</th>-->
                <th width="100">患者</th>
                <!--<th width="100">医生ID</th>-->
                <th width="100">医生</th>
                <!--<th width="130">描述</th>-->
                <th width="130">状态</th>
                <th width="130">助手</th>
                <th width="150">创建时间</th>
                <th width="100">修改时间</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="data">
                <tr class="text-c">
                    <td><input type="checkbox" value="{$data.id}" class="item"></td>
                    <td>{$data.id}</td>
                    <!--<td>{$data.patient_id}</td>-->
                    <td>
                        <a href="javascript:;" onclick="member_show('查看医生','{:U('patient/showInfo')}','{$data.patient_id}','300','460')">
                            <i class="avatar size-L radius">
                                <img src="<if condition="$data['patient']['cover']">__UPS__{$data['patient']['cover']}<else/>__AIMG__no_cover.png</if>">
                            </i>
                        </a><br>
                        <span class="label label-success radius">{$data['patient']['name']}</span>
                    </td>
                    <!--<td>{$data.doctor_id}</td>-->
                    <td>
                        <a href="javascript:;" onclick="member_show('查看医生','{:U('Doctor/showInfo')}','{$data.doctor_id}','300','460')">
                            <i class="avatar size-L radius">
                                <img src="<if condition="$data['doctor']['cover']">__UPS__{$data['doctor']['cover']}<else/>__AIMG__no_cover.png</if>">
                            </i>
                        </a><br>
                        <span class="label label-success radius">{$data['doctor']['name']}</span>
                    </td>
                    <!--<td>{$data.description}</td>-->
                    <td><span class="label label-success radius">{$data.link_status.title}</span></td>
                    <!--<td>{:getHelperInfo($data['helper_id'])}</td>-->
                    <td style="height: 50px">
                        <if condition="empty($data['helper_id'])">
                            暂无
                            <else/>
                            <a href="javascript:;" onclick="member_show('查看助手','{:U('Doctor/showInfo')}','{$data.helper_id}','300','460')">
                                    <i class="avatar size-L radius">
                                        <img src="<if condition="$data['helper']['cover']">__UPS__{$data['helper']['cover']}<else/>__AIMG__no_cover.png</if>">
                                    </i>
                            </a><br>
                            <span class="label label-success radius">{$data['helper']['name']}</span>
                        </if>
                    </td>
                    <td>{:date('Y-m-d H:i:s',$data['create_time'])}</td>
                    <td>{:date('Y-m-d H:i:s',$data['last_time'])}</td>
                    <td class="td-manage">
                        <if condition="I('get.del')">
                            <a title="恢复" href="javascript:;" onclick="recover('{:U('recover',array('id'=>$data['id']))}',this)" class="ml-5" style="text-decoration:none">
                                <i class="Hui-iconfont">&#xe6e1;</i> 恢复
                            </a>
                            <a title="彻底删除" href="javascript:;" onclick="delectOne('{:U('deleted',array('id'=>$data['id']))}',this)" class="ml-5" style="text-decoration:none">
                                <i class="Hui-iconfont">&#xe6e2;</i>彻底删除
                            </a>
                            <else/>
                            <a title="编辑" href="javascript:;" onclick="showIframe('编辑','{:U('showEdit',array('id'=>$data['id']))}',600,600)" class="ml-5" style="text-decoration:none">
                                <i class="Hui-iconfont">&#xe6df;</i> 编辑
                            </a>
                            <a title="删除" href="javascript:;" onclick="delectOne('{:U('del',array('id'=>$data['id']))}',this)" class="ml-5" style="text-decoration:none">
                                <i class="Hui-iconfont">&#xe6e2;</i> 删除
                            </a>
                        </if>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
        <!--<div class="page">{$page}</div>-->
    </div>
</div>
<include file="Common:footer_include"/>
<script>
    /*用户-查看*/
    function member_show(title,url,id,w,h){
        layer_show(title,url+"?id="+id,w,h);
    }
    function reload() {
        var status_id = $(".status_id").val();
        goUrl("?status_id=" + status_id);
    }
</script>
</body>
</html>
